APP_NAME = led_test
MODULE_NAME = my_bus
MODULE_NAME2 = my_dev
MODULE_NAME3 = my_drv
ROOTFS_DIR=/home/zzz/samba_NFS_FTP/fs4412/rootfs

CROSS_COMPILE = /usr/local/toolchain/toolchain-4.5.1/bin/arm-none-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc

ifeq ($(KERNELRELEASE),)
KERNEL_DIR ?= /home/zzz/linux-3.0.86/
PWD= $(shell pwd)

all:
	make -C $(KERNEL_DIR) M=$(PWD) modules
	$(CC) $(APP_NAME).c -o $(APP_NAME)
clean:
	make -C $(KERNEL_DIR) M=$(PWD) clean
	rm $(APP_NAME) -rf
install:
	cp -raf *.ko $(APP_NAME)  $(ROOTFS_DIR)/led_bus

else
	obj-m +=$(MODULE_NAME).o
	obj-m +=$(MODULE_NAME2).o
	obj-m +=$(MODULE_NAME3).o
endif
